/**
 * 
 */
package com.shine.icis.dto;

import java.text.DecimalFormat;

/**
 * 对应A13信息
 * 
 * @author zuohp
 */
public class HsStockHis {

		//private DecimalFormat doubleFormat = new DecimalFormat("##,##0.00");
		private Integer branchNo;//营业部分支
		private String exchangeType;//交易类别
		private String taCode;//TA代码
		private String stockAccount;//股东代码
		private String stockCode;//证券代码
		private Integer fundAccount;//资金账号
		private String clientId;//客户号
		private String moneyType;//币种类别
		private String stockType;//证券类别
		private double beginAmount;//期初数量
		private double currentAmount;//当前数量
		private double uncomeBuyAmount;//未回买入数量
		private double uncomeSellAmount;//未回卖出数量
		private double frozenAmount;//冻结数量
		private double unfrozenAmount;//解冻数量
		private double correctAmount;//资产修正数量
		private double sumBuyAmount;//累计买入数量
		private double sumBuyBalance;//累计买入金额
		private double sumSellAmount;//累计卖出数量
		private double sumSellBalance;//累计卖出金额
		private double costPrice;//买入均价
		private String  positionStr;//定位串
		private Integer validDate;//开始日期
		private Integer invalidDate;//结束日期
		
		//营业部分支
		public Integer getBranchNo() {
			return branchNo;
		}
		public void setBranchNo(Integer branchNo) {
			this.branchNo = branchNo;
		}
		//交易类别
		public String getExchangeType() {
			return exchangeType;
		}
		public void setExchangeType(String exchangeType) {
			this.exchangeType = exchangeType;
		}
		//TA代码
		public String getTaCode(){
			return taCode;
		}
		public void setTaCode(String taCode) {
			this.taCode = taCode;
		}
		//股东代码
		public String getStockAccount() {
			return stockAccount;
		}
		public void setStockAccount(String stockAccount) {
			this.stockAccount = stockAccount;
		}
		//证券代码
		public String getStockCode() {
			return stockCode;
		}
		public void setStockCode(String stockCode) {
			this.stockCode = stockCode;
		}
		//资金账号
		public Integer getFundAccount() {
			return fundAccount;
		}
		public void setFundAccount(Integer fundAccount) {
			this.fundAccount = fundAccount;
		}
		//客户号
		public String getClientId() {
			return clientId;
		}
		public void setClientId(String clientId) {
			this.clientId = clientId;
		}
		//币种类别
		public String getMoneyType() {
			return moneyType;
		}
		public void setMoneyType(String moneyType) {
			this.moneyType = moneyType;
		}	
		//证券类别
		public String getStockType() {
			return stockType;
		}
		public void setStockType(String stockType) {
			this.stockType = stockType;
		}
		//期初数量
		public double getBeginAmount(){
			return beginAmount;
		}
		public void SetBeginAmount(double beginAmount){
			this.beginAmount = beginAmount;
		}
		//当前数量
		public double getCurrentAmount(){
			return currentAmount;
		}
		public void SetCurrentAmount(double currentAmount){
			this.currentAmount = currentAmount;
		}
		//未回买入数量
		public double getUncomeBuyAmount(){
			return uncomeBuyAmount;
		}
		public void SetUncomeBuyAmount(double uncomeBuyAmount){
			this.uncomeBuyAmount = uncomeBuyAmount;
		}
		//未回卖出数量
		public double getUncomeSellAmount(){
			return uncomeSellAmount;
		}
		public void SetUncomeSellAmount(double uncomeSellAmount){
			this.uncomeSellAmount = uncomeSellAmount;
		}	
		//冻结数量
		public double getFrozenAmount(){
			return frozenAmount;
		}
		public void SetFrozenAmount(double frozenAmount){
			this.frozenAmount = frozenAmount;
		}	
		//解冻数量
		public double getUnfrozenAmount(){
			return unfrozenAmount;
		}
		public void SetUnfrozenAmount(double unfrozenAmount){
			this.unfrozenAmount = unfrozenAmount;
		}	
		//资产修正数量
		public double getCorrectAmount(){
			return correctAmount;
		}
		public void SetCorrectAmount(double correctAmount){
			this.correctAmount = correctAmount;
		}
		//累计买入数量
		public double getSumBuyAmount(){
			return sumBuyAmount;
		}
		public void SetSumBuyAmount(double sumBuyAmount){
			this.sumBuyAmount = sumBuyAmount;
		}
		//累计买入金额
		public double getSumBuyBalance(){
			return sumBuyBalance;
		}
		public void SetSumBuyBalance(double sumBuyBalance){
			this.sumBuyBalance = sumBuyBalance;
		}
		//累计卖出数量
		public double getSumSellAmount(){
			return sumSellAmount;
		}
		public void SetSumSellAmount(double sumSellAmount){
			this.sumSellAmount = sumSellAmount;
		}
		//累计卖出金额
		public double getSumSellBalance(){
			return sumSellBalance;
		}
		public void SetSumSellBalance(double sumSellBalance){
			this.sumSellBalance = sumSellBalance;
		}
		//买入均价
		public double getCostPrice(){
			return costPrice;
		}
		public void SetCostPrice(double costPrice){
			this.costPrice = costPrice;
		}
		//定位串
		public String getPositionStr() {
			return positionStr;
		}
		public void setPositionStr(String positionStr) {
			this.positionStr = positionStr;
		}	
		//开始时间
		public Integer getValidDate() {
			return validDate;
		}
		public void setValidDate(Integer validDate) {
			this.validDate = validDate;
		}
		//结束时间
		public Integer getInvalidDate() {
			return invalidDate;
		}
		public void setInvalidDate(Integer invalidDate) {
			this.invalidDate = invalidDate;
		}	

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + ((positionStr == null) ? 0 : positionStr.hashCode());
			result = prime * result + ((stockCode == null) ? 0 : stockCode.hashCode());
			result = prime * result + ((validDate == null) ? 0 : validDate);
			result = prime * result + ((invalidDate == null) ? 0 : invalidDate);
			return result;
		}
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final HsStockHis other = (HsStockHis) obj;
			if (positionStr == null || stockCode == null || validDate == null || invalidDate == null) {
//				if (other.id != null)
					return false;
			} else if (!positionStr.equals(other.positionStr) || !stockCode.equals(other.stockCode) || !validDate.equals(other.validDate) || !invalidDate.equals(other.invalidDate))
				return false;
			return true;
		}
}
